#pragma once

#include "Enemy.h"

class Player;

class SawBot : public Enemy
{
	Animation sawBot[4];
	bool twoPlayer;
	int state;
	float floorsawTimer;
	float waitTime;
	float attackTimer;
	float attackRate;
	Player* player1;
	Player* player2;
	int target;
	int targetPosX;
	int targetPosY;
	float damage;
	bool oneFrame;

	int moveSound;
	int attackSound;
	int shootSound;
	int floorSawSound;
	int hurtSound;
	//std::vector<Room*> roomList;

public:
	~SawBot();

	SawBot(Player* p1, Player* p2);

	void Update(float elapsed);

	void Render();

	bool CheckCollision(IEntity* base);

	void Attack(float elapsed);

	virtual void HandleEvent(Event* thisEvent);

	RECT GetRect();

	//void SetMyRoom(std::vector<Room*> r) {roomList = r;}

	void SetAnimationID(int id[4])
	{
		for(int i = 0; i < 4; ++i)
		{
			sawBot[i] = *AnimationSystem::GetInstance()->GetAnimation(id[i]);
		}

		SetWidth(sawBot[0].GetCollsionRect().right - sawBot[0].GetCollsionRect().left);
		SetHeight(sawBot[0].GetCollsionRect().bottom - sawBot[0].GetCollsionRect().top);
	}
};
